﻿@model Nullable<System.DateTime>
@{
string name = ViewData.TemplateInfo.HtmlFieldPrefix;
string id = name.Replace( ".", "_" );
}

<div class="input-append date" data-date="2012-01-01" data-date-format="yyyy-MM-dd">
    @if ( Model.HasValue ) {
   @Html.TextBox("", String.Format("{0:yyyy-MM-dd}", Model.Value), new { @class="span2" , @readonly="" })
}
else {
   @Html.TextBox( "" , String.Format( "{0:yyyy-MM-dd}" , DateTime.Now), new { @class="span2" ,@readonly="" })
}
				
				<span class="add-on"><i class="icon-calendar"></i></span>
</div>